﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace FilterTest1.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class DemoController : ControllerBase
    {
        [HttpGet]
        public string Test1()
        {
            //读一个不存在的文件,会抛文件不存在异常,System.IO.FileNotFoundException:“Could not find file 'f:\1.txt'.”
            String s =System.IO.File.ReadAllText("f:/1.txt");
            return s;
        }
    }
}
